﻿using MyCode.Project.Domain.Message.Request.CouponActivity;
using MyCode.Project.Domain.Message.Request.Message;
using MyCode.Project.Domain.Message.Response.CouponActivity;
using MyCode.Project.Domain.Message.Response.SalesSheet;
using MyCode.Project.Domain.Model;
using System;
using System.Collections.Generic;

namespace MyCode.Project.Services
{
    /// <summary>
    /// 账单记录模块 相关服务
    /// </summary>
    public interface ICouponActityDllService
    {

        /// <summary>
        /// 需要判断条件的会员领取的活动优惠券的方法 
        /// </summary>
        /// <param name="couponActivityId">优惠券活动ID</param>
        /// <param name="shopId">领取优惠券的店铺ID</param>
        /// <param name="customerId">优惠券所属加盟商ID</param>
        /// <param name="memberId">领取优惠券的会员ID</param>
        /// <param name="fromCustomerId">来源加盟商ID</param>
        /// <param name="fromClerkId">来源店员ID</param>
        /// <param name="fromMemberId">来源会员ID</param>
        /// <param name="sourceType">分享来源类型 0：加盟商 1：店员 2：会员 3:自主领取</param>
        /// <param name="couponIds">提前知道的优惠券ID</param>
        /// <param name="getType">到账类型  0=直接到账 -1=要点领取按钮</param>
        AddCouponResp MemberGetCouponList(MemberGetCouponListAct act,int AddType=0);

        /// <summary>
        /// 生日优惠券发放
        /// </summary>
        /// <param name="nowstring"></param>
        
         void BirthDayCoupon(string nowstring);

        /// <summary>
        /// 添加调度任务发放生日优惠券
        /// </summary>
        void AddBirthDayCouponTask();

        /// <summary>
        /// 根据会员已有优惠券和商品ID,返回符合订单条件的优惠券ID
        /// </summary>
        /// <param name="couponMemberList"></param>
        /// <param name="barcodeIds"></param>
        /// <returns></returns>
        List<Guid> CanUseCoupon(List<BasCouponMember> couponMemberList, decimal totalAmount, List<SheetItemResp> sheetItemList);

        /// <summary>
        /// 无需判断直接发放优惠券的方法
        /// </summary>
        /// <param name="act"></param>
        void SendCoupon(SendCouponAct act);

        /// <summary>
        /// 按门店赠送优惠券直接到账的调度方法
        /// </summary>
        /// <param name="json"></param>
        void AutoSendMemberCouponList(string json);

        /// <summary>
        /// 判断是否允许领取优惠券
        /// </summary>
        /// <param name="act"></param>
        /// <returns></returns>
        AddCouponResp CheckIfCanGet(MemberGetCouponListAct act, int AddType = 0);
    }
}
